<template>
    <div class="lotteryAnimat">
        <canvas id="canvas" width="1124" height="708">很抱歉，您的浏览器不支持canvas！</canvas>
    </div>
</template>

<script>
import Lottery from "../../../common/animate/ssc/lottery.js";
export default {
  data() {
    return {};
  },

  components: {},

  computed: {},

  mounted() {
    const lottery = new Lottery();
    lottery.topNumber.setNumStr("12345").drawImage();
    lottery.watch.setCount(10);
    lottery.watch.onComplete = () => {
      lottery.restart();
      setTimeout(() => {
        lottery.setWinNum("54321");
        lottery.displayResult();
        lottery.topNumber.setNumStr("54321").drawImage();
      }, 5000);
    };
    lottery.watch.start();
    frame();
    function frame() {
      lottery.render();
      requestAnimationFrame(frame);
    }
  },

  methods: {}
};
</script>
<style lang='less'>
</style>